<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
    <th:block th:include="include :: header('【请填写功能名称】列表')" />
</head>
<body class="gray-bg">
     <div class="container-div">
        <div class="row">
            <div class="col-sm-12 search-collapse">
                <form id="formId">
                    <div class="select-list">
                        <ul>
                            <li>
                                <p>终端名称：</p>
                                <input type="text" name="clientname"/>
                            </li>
                            <li>
                                <p>终端类型：</p>
                                <input type="text" name="clientinfo"/>
                            </li>
                            <li class="select-time">
                                <p>创建时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginCreatdate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endCreatdate]"/>
                            </li>
                            <li class="select-time">
                                <p>最后通信时间：</p>
                                <input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[beginFinallogindate]"/>
                                <span>-</span>
                                <input type="text" class="time-input" id="endTime" placeholder="结束时间" name="params[endFinallogindate]"/>
                            </li>
                            <li>
                                <p>备注：</p>
                                <input type="text" name="note"/>
                            </li>
                            <li>
                                <p>电池1电压：</p>
                                <input type="text" name="pow1"/>
                            </li>
                            <li>
                                <p>电池组电压：</p>
                                <input type="text" name="grouppow"/>
                            </li>
                            <li>
                                <p>充电电流：</p>
                                <input type="text" name="chargeCurrent"/>
                            </li>
                            <li>
                                <p>负载电流：</p>
                                <input type="text" name="loadCurrent"/>
                            </li>
                            <li>
                                <p>输出电压：</p>
                                <input type="text" name="outputVoltage"/>
                            </li>
                            <li>
                                <p>外部电源电压：</p>
                                <input type="text" name="extendpow"/>
                            </li>
                            <li>
                                <p>太阳能电压：</p>
                                <input type="text" name="solarpow"/>
                            </li>
                            <li>
                                <p>工作温度：</p>
                                <input type="text" name="operatingTemp"/>
                            </li>
                            <li>
                                <p>charge：</p>
                                <input type="text" name="charge"/>
                            </li>
                            <li>
                                <p>work：</p>
                                <input type="text" name="work"/>
                            </li>
                            <li>
                                <p>IP：</p>
                                <input type="text" name="ip"/>
                            </li>
                            <li>
                                <p>环境温度：</p>
                                <input type="text" name="ambientTemp"/>
                            </li>
                            <li>
                                <p>环境湿度：</p>
                                <input type="text" name="ambientHum"/>
                            </li>
                            <li>
                                <p>环境照度：</p>
                                <input type="text" name="ambientLight"/>
                            </li>
                            <li>
                                <p>土壤温度：</p>
                                <input type="text" name="soilTemp"/>
                            </li>
                            <li>
                                <p>土壤湿度：</p>
                                <input type="text" name="soilHum"/>
                            </li>
                            <li>
                                <p>大气压力：</p>
                                <input type="text" name="atmoPressure"/>
                            </li>
                            <li>
                                <p>风速：</p>
                                <input type="text" name="windSpeed"/>
                            </li>
                            <li>
                                <p>风向：</p>
                                <input type="text" name="windDirection"/>
                            </li>
                            <li>
                                <p>雨雪：</p>
                                <input type="text" name="snowAndRain"/>
                            </li>
                            <li>
                                <p>pm 2.5：</p>
                                <input type="text" name="particulateMatter"/>
                            </li>
                            <li>
                                <p>一氧化碳：</p>
                                <input type="text" name="carbonicOxide"/>
                            </li>
                            <li>
                                <p>二氧化碳：</p>
                                <input type="text" name="carbonDioxide"/>
                            </li>
                            <li>
                                <p>二氧化硫：</p>
                                <input type="text" name="sulfurDioxide"/>
                            </li>
                            <li>
                                <a class="btn btn-primary btn-rounded btn-sm" onclick="$.table.search()"><i class="fa fa-search"></i>&nbsp;搜索</a>
                                <a class="btn btn-warning btn-rounded btn-sm" onclick="$.form.reset()"><i class="fa fa-refresh"></i>&nbsp;重置</a>
                            </li>
                        </ul>
                    </div>
                </form>
            </div>

            <div class="btn-group-sm" id="toolbar" role="group">
                <a class="btn btn-success" onclick="$.operate.add()" shiro:hasPermission="system:client:add">
                    <i class="fa fa-plus"></i> 添加
                </a>
                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:client:edit">
                    <i class="fa fa-edit"></i> 修改
                </a>
                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:client:remove">
                    <i class="fa fa-remove"></i> 删除
                </a>
                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:client:export">
                    <i class="fa fa-download"></i> 导出
                 </a>
            </div>
            <div class="col-sm-12 select-table table-striped">
                <table id="bootstrap-table"></table>
            </div>
        </div>
    </div>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
        var editFlag = [[${@permission.hasPermi('system:client:edit')}]];
        var removeFlag = [[${@permission.hasPermi('system:client:remove')}]];
        var prefix = ctx + "system/client";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                removeUrl: prefix + "/remove",
                exportUrl: prefix + "/export",
                modalName: "【请填写功能名称】",
                columns: [{
                    checkbox: true
                },
                {
                    field : 'imei', 
                    title : '终端编号',
                    visible: false
                },
                {
                    field : 'clientname', 
                    title : '终端名称'
                },
                {
                    field : 'clientinfo', 
                    title : '终端类型'
                },
                {
                    field : 'creatdate', 
                    title : '创建时间'
                },
                {
                    field : 'finallogindate', 
                    title : '最后通信时间'
                },
                {
                    field : 'note', 
                    title : '备注'
                },
                {
                    field : 'isuse', 
                    title : '是否启用'
                },
                {
                    field : 'pow1', 
                    title : '电池1电压'
                },
                {
                    field : 'grouppow', 
                    title : '电池组电压'
                },
                {
                    field : 'chargeCurrent', 
                    title : '充电电流'
                },
                {
                    field : 'loadCurrent', 
                    title : '负载电流'
                },
                {
                    field : 'outputVoltage', 
                    title : '输出电压'
                },
                {
                    field : 'extendpow', 
                    title : '外部电源电压'
                },
                {
                    field : 'solarpow', 
                    title : '太阳能电压'
                },
                {
                    field : 'operatingTemp', 
                    title : '工作温度'
                },
                {
                    field : 'charge', 
                    title : '工作温度'
                },
                {
                    field : 'work', 
                    title : '工作温度'
                },
                {
                    field : 'ip', 
                    title : '工作温度'
                },
                {
                    field : 'isregister', 
                    title : '工作温度'
                },
                {
                    field : 'ambientTemp', 
                    title : '环境温度'
                },
                {
                    field : 'ambientHum', 
                    title : '环境湿度'
                },
                {
                    field : 'ambientLight', 
                    title : '环境照度'
                },
                {
                    field : 'soilTemp', 
                    title : '土壤温度'
                },
                {
                    field : 'soilHum', 
                    title : '土壤湿度'
                },
                {
                    field : 'atmoPressure', 
                    title : '大气压力'
                },
                {
                    field : 'windSpeed', 
                    title : '风速'
                },
                {
                    field : 'windDirection', 
                    title : '风向'
                },
                {
                    field : 'snowAndRain', 
                    title : '雨雪'
                },
                {
                    field : 'particulateMatter', 
                    title : 'pm 2.5'
                },
                {
                    field : 'carbonicOxide', 
                    title : '一氧化碳'
                },
                {
                    field : 'carbonDioxide', 
                    title : '二氧化碳'
                },
                {
                    field : 'sulfurDioxide', 
                    title : '二氧化硫'
                },
                {
                    title: '操作',
                    align: 'center',
                    formatter: function(value, row, index) {
                        var actions = [];
                        actions.push('<a class="btn btn-success btn-xs ' + editFlag + '" href="javascript:void(0)" onclick="$.operate.edit(\'' + row.imei + '\')"><i class="fa fa-edit"></i>编辑</a> ');
                        actions.push('<a class="btn btn-danger btn-xs ' + removeFlag + '" href="javascript:void(0)" onclick="$.operate.remove(\'' + row.imei + '\')"><i class="fa fa-remove"></i>删除</a>');
                        return actions.join('');
                    }
                }]
            };
            $.table.init(options);
        });
    </script>
</body>
</html>